package net.mysoft.framework.util;

import java.util.Comparator;

import net.mysoft.budgetsoft.system.domain.BaseEntity;

public class DateCompartor implements Comparator<BaseEntity> {

	@Override
	public int compare(BaseEntity o1, BaseEntity o2) {
		long l1 = o1.getCreateDate().getTime();
		long l2 = o2.getCreateDate().getTime();
		if(l1>l2) return 1;
		if(l1<l2) return -1;
		return 0;
	}

}
